home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / SUB_ARCT / LIB / PANNER_H.JAV < prev    next >
Encoding:
Text File  |  1996-10-04  |  2.1 KB  |  80 lines

  1.  
  2. package sub_arctic.lib;
  3.  
  4. import sub_arctic.input.*;
  5. import sub_arctic.output.*;
  6. import sub_arctic.constraints.constraint;
  7.  
  8. /**
  9.  * This class is here to help the panner know when its children's size
  10.  * gets changed. This lets it recompute the values for its scrollbars
  11.  * and what not.
  12.  *
  13.  * @author Ian Smith
  14.  */
  15. class panner_helper extends base_parent_interactor {
  16.  
  17.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  18.  
  19.   /** 
  20.    * Default constructor.
  21.    */
  22.   panner_helper()  {
  23.     super(0,0);
  24.     setup_for_fixed_children(1);
  25.   }
  26.  
  27.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  28.  
  29.   /** 
  30.    * This gets called when our size changes. We use it to echo information
  31.    * back to the panner.
  32.    * @param int v new w value
  33.    * @exception general
  34.    */
  35.   protected void set_raw_w(int v)  {
  36.     panner p;
  37.  
  38.     /* call the super's code to keep things working */
  39.     super.set_raw_w(v);
  40.  
  41.     p=(panner)(parent().parent());
  42.     p.child_size_changed_w(v);
  43.   }
  44.  
  45.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  46.  
  47.   /** 
  48.    * This gets called when our size changes.  We use it to echo information
  49.    * back to the panner.
  50.    * @param int v new h value
  51.    */
  52.   protected void set_raw_h(int v)  {
  53.     panner p;
  54.  
  55.     /* call the super's code to keep things working */
  56.     super.set_raw_h(v);
  57.  
  58.     p=(panner)(parent().parent());
  59.     p.child_size_changed_h(v);
  60.   }
  61.  
  62.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  63. }
  64. /*=========================== COPYRIGHT NOTICE ===========================
  65.  
  66. This file is part of the subArctic user interface toolkit.
  67.  
  68. Copyright (c) 1996 Scott Hudson and Ian Smith
  69. All rights reserved.
  70.  
  71. The subArctic system is freely available for most uses under the terms
  72. and conditions described in 
  73.   http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html 
  74. and appearing in full in the lib/interactor.java source file.
  75.  
  76. The current release and additional information about this software can be 
  77. found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  78.  
  79. ========================================================================*/
  80.